<template>
     MyRight组件
</template>
<script setup>
import {onActivated,onDeactivated} from 'vue';
onActivated(() => {
     console.log('MyRight组件激活');
})
onDeactivated(() => {
     console.log('MyRight组件停用');
})

</script>